Remove dead links in modules

Hello,

I encountered a problem with dead links and have no idea how to solve this.

We have functional specifications modules and requirement specifiaction modules where objects are linked between these two modules. If I delete an object in a functional specification (because it was wrong or it is no longer needed for example) the incoming link in the requirement specifiaction module is still visible. If I try to navigate to the source, I get a error message like "object was deleted". How can I repair this dead link in the module or scan several modules for dead links like this?

 

Thank you in advance,

Matthias

 


M@tze - Thu Apr 25 05:06:54 EDT 2013

Re: Remove dead links in modules
kabr - Thu Apr 25 05:18:02 EDT 2013

Purge the deleted objects and the inlinks will magically disappear.

 

Karl

Re: Remove dead links in modules
Wolfgang Uhr - Thu Apr 25 05:23:49 EDT 2013

Hi

Dead Links are left if someone deletes the target of a link. The object may be soft-deleted or hard-deleted. In the first step you get an object which you can check by "isDeleted" and in the second something strange may happen.

So put the following lines into each loop which iterates throug link targe objects:

noError();

myTargetObect = target(mySourceObject);

if (lastError() != "") { continue }

if (myTargetObect == null) { continue }

if (isDeleted(myTargetObect)) { continue }

So for every doors version and every form of object rests in your data, you have done your best.

Best regars

Wolfgang

Re: Remove dead links in modules
M@tze - Thu Apr 25 05:28:35 EDT 2013

kabr - Thu Apr 25 05:18:02 EDT 2013

Purge the deleted objects and the inlinks will magically disappear.

 

Karl

OMG ... this was too simple ... ;)    *KnockMyHeadOnTheTable*

Thank you Karl, for this fast answer!

 

Matthias

Re: Remove dead links in modules
Wolfgang Uhr - Thu Apr 25 06:05:20 EDT 2013

M@tze - Thu Apr 25 05:28:35 EDT 2013

OMG ... this was too simple ... ;)    *KnockMyHeadOnTheTable*

Thank you Karl, for this fast answer!

 

Matthias

If the objecs are baselined you this may not work.

Re: Remove dead links in modules
M@tze - Thu Apr 25 07:57:46 EDT 2013

Wolfgang Uhr - Thu Apr 25 06:05:20 EDT 2013

If the objecs are baselined you this may not work.

Belongs this answer to the DXL script which you posted below or the "Purge All" command from Karl?

Re: Remove dead links in modules
M@tze - Thu Apr 25 08:00:20 EDT 2013

Wolfgang Uhr - Thu Apr 25 05:23:49 EDT 2013

Hi

Dead Links are left if someone deletes the target of a link. The object may be soft-deleted or hard-deleted. In the first step you get an object which you can check by "isDeleted" and in the second something strange may happen.

So put the following lines into each loop which iterates throug link targe objects:

noError();

myTargetObect = target(mySourceObject);

if (lastError() != "") { continue }

if (myTargetObect == null) { continue }

if (isDeleted(myTargetObect)) { continue }

So for every doors version and every form of object rests in your data, you have done your best.

Best regars

Wolfgang

Thank you too for the code.

 

Kind regards,

Matthias

Re: Remove dead links in modules
llandale - Thu Apr 25 16:16:28 EDT 2013

Lets not talk about corrupted links.   You can see use the GUI Object Properties to tell you the other linked object.  You can then manually go there, undelete the object, delete the link, then re-delete the object.  You can also do that with DXL, get the source Object handle and ask if it isDeleted(oSource).

You can also brouse for outgoing links for deleted Functional Objects.

It is kind of a nuisance to be able to delete objects with Outgoing links as it puts a strain on those linked objects.

-louie